package com.walle.concurrenttest.pattern.activeobject;

/**
 * @author zhangjiapeng
 * @Package com.walle.concurrenttest.pattern.activeobject
 * @Description: ${todo}
 * @date 2019/2/27 15:39
 */
public class ActiveObjectFactory {


    public static ActiveObject createActiveObject(){

        Servant servant = new Servant();
        ActivationQueue queue = new ActivationQueue();
        SchedulerThread schedulerThread = new SchedulerThread(queue);
        Proxy proxy = new Proxy(schedulerThread,servant);
        schedulerThread.start();
        return proxy;
    }
}
